//  this library.
import 'package:hktk_app/model/subject/question_collection_model.dart';

/// 试卷记录相关对象模型
class RecordsModel {
  // 1
  String? createdTime;

  // 2
  String? modifyTime;

  // 3
  String? id;

  // 4、用户id
  String? userId;

  // 5、行业id
  String? industryId;

  // 6、行业名
  String? industryName;

  // 7、考试id
  String? examId;

  // 8、考试名
  String? examName;

  // 9、科目id
  int? categoryId;

  // 10、科目名
  String? categoryName;

  // 11、试卷id
  String? paperId;

  // 12、试卷类型
  String? type;

  // 13、记录名称
  String? name;

  // 14、做题时间
  int? seconds;

  // 15、是否通过
  bool? hp;

  // 16、得分数
  double? score;

  // 17、总分数
  double? allScore;

  // 18、通过分数
  double? passScore;

  // 19、试卷总题数
  int? qcount;

  // 20、做题数目
  int? doCount;

  // 21、试卷错题数
  int? errorCount;

  // 22、开始时间
  String? startTime;

  // 23、结束时间
  String? endTime;

  // 24、试卷完成次数
  int? completeCount;

  // 25、考试时长
  int? examTime;

  // 26、这个试卷库创建试卷记录接口未返回对应参数
  String? lastId;

  // 27、
  bool? haveFinish;

  // 28、这个试卷库创建试卷记录接口未返回对应参数
  String? recordsType;

  // 29、
  List<ContentCollection>? content;

  // 30、内容具体显示
  String? remark;

  RecordsModel({
    this.createdTime,
    this.modifyTime,
    this.id,
    this.userId,
    this.industryId,
    this.industryName,
    this.examId,
    this.examName,
    this.categoryId,
    this.categoryName,
    this.paperId,
    this.type,
    this.name,
    this.seconds,
    this.hp,
    this.score,
    this.allScore,
    this.passScore,
    this.qcount,
    this.doCount,
    this.errorCount,
    this.startTime,
    this.endTime,
    this.completeCount,
    this.examTime,
    this.lastId,
    this.haveFinish,
    this.recordsType,
    this.content,
    this.remark,
  });

  RecordsModel.fromJson(Map<String, dynamic> json) {
    createdTime = json['createdTime'];
    modifyTime = json['modifyTime'];
    id = json['id'];
    userId = json['userId'];
    industryId = json['industryId'];
    industryName = json['industryName'];
    examId = json['examId'];
    examName = json['examName'];
    categoryId = json['categoryId'];
    categoryName = json['categoryName'];
    paperId = json['paperId'];
    type = json['type'];
    name = json['name'];
    seconds = json['seconds'];
    hp = json['hp'];
    score = json['score'];
    allScore = json['allScore'];
    passScore = json['passScore'];
    qcount = json['qcount'];
    doCount = json['doCount'];
    errorCount = json['errorCount'];
    startTime = json['startTime'];
    endTime = json['endTime'];
    completeCount = json['completeCount'];
    examTime = json['examTime'];
    lastId = json['lastId'];
    haveFinish = json['haveFinish'];
    recordsType = json['recordsType'];
    if (json["content"] != null) {
      content = <ContentCollection>[];
      json["content"].forEach((v) {
        content!.add(ContentCollection.fromJson(v));
      });
    }
    remark = json["remark"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['createdTime'] = createdTime;
    data['modifyTime'] = modifyTime;
    data['id'] = id;
    data['userId'] = userId;
    data['industryId'] = industryId;
    data['industryName'] = industryName;
    data['examId'] = examId;
    data['examName'] = examName;
    data['categoryId'] = categoryId;
    data['categoryName'] = categoryName;
    data['paperId'] = paperId;
    data['type'] = type;
    data['name'] = name;
    data['seconds'] = seconds;
    data['hp'] = hp;
    data['score'] = score;
    data['allScore'] = allScore;
    data['passScore'] = passScore;
    data['qcount'] = qcount;
    data['doCount'] = doCount;
    data['errorCount'] = errorCount;
    data['startTime'] = startTime;
    data['endTime'] = endTime;
    data['completeCount'] = completeCount;
    data['examTime'] = examTime;
    data['lastId'] = lastId;
    data['haveFinish'] = haveFinish;
    data['recordsType'] = recordsType;
    if (content != null) {
      data['content'] = content!.map((v) => v.toJson()).toList();
    }
    data["remark"] = remark;
    return data;
  }
}
